import Vue from 'vue'
import Router from 'vue-router'
import ManagerTable from "../components/ManagerTable";
import GoodsTable from "../components/GoodsTable";
import AddGoodsForm from "../components/AddGoodsForm";
import UpdateGoodsForm from "../components/UpdateGoodsForm";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'ManagerTable',
      component: ManagerTable,
      children:[
        {
          path:'/goods/show',
          name:'GoodsTable',
          component:GoodsTable
        },
        {
          path:'/goods/add',
          name:'AddGoodsForm',
          component:AddGoodsForm
        },
        {
          path:'/goods/update',
          name:'UpdateGoodsForm',
          component:UpdateGoodsForm
        }
      ]
    }
  ]
})
